var plugin = requirePlugin("WechatSI")
let manager = plugin.getRecordRecognitionManager();
const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.autoplay = true;
var speech=function(content){
  plugin.textToSpeech({
    lang: "zh_CN",
    tts: true,
    content: content,
    success: function (res) {
      console.log("succ tts", res.filename)
      innerAudioContext.src = res.filename;
      innerAudioContext.play();
    },
    fail: function (res) {
      console.log("fail tts", res)
    }
  })
}
module.exports={
  speech: speech
}
